#ifndef __INFRARED_H
#define __INFRARED_H

#include "reg52.h"
#include "type.h"
#include "interrupt.h"
#include "gpio.h"

typedef struct _IR_T
{
    INT8U step;
        INT8U Data[4];//0:���յ��ź�
        INT8U data_pointer;
        INT8U Bit;
        INT8U delay_ms;
}IR_T;

#define IR_DATA_PIN  2
#define IR_DATA_ODR  P3

#define SET_IR_DATA() do{SET_Bit(IR_DATA_ODR, IR_DATA_PIN);}while(0)
#define GET_IR_DATA() GET_Bit(IR_DATA_ODR, IR_DATA_PIN)

extern void ir_init();
extern void ir_data_process();
#endif